<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8" />
  </head>
<body>
  <div id="app">
   {{menuList}}
   
   <block v-for="menu in menuList">
   		<ul>
			<li>{{menu.name}}</li>
			<block v-for="item in menu.child">
				<li>{{item.name}}</li>
			</block>
		</ul>
   </block>
   
   
  </div>
</body>
  <!-- 先引入 Vue -->
   <script th:src="@{../public/js/vue.min.js}"></script>
   <script th:src="@{../public/js/vue-resource.min.js}"></script>
  <script>
   var vm= new Vue({
      el: '#app',
      data: {
    	  ss:'你好',
    	  menuList:[]
      },
      created:function(){
    	  this.getMenu();
      },
      methods:{
    	  getMenu:function(){
    		  var self=this
    		  this.$http.get('menu/user')
				.then((response) => {
					console.log(response.data);
					self.menuList=response.data
					
				})
				.catch(function(response) {
					console.log(response)
				})
    	  }
      }
    })
  </script>
</html>